package com.gardeneaters.game_v0.rules;

class PowerCalculator {

	private double abc;
	private int numOfHex;
	private int team;
	
	/* the actual calculation is (a+b+c) + 0.3*n +(-1)*n +1
		it means (a-1)+(b-1)+(c-1) + 0.3*n +1    */
	protected PowerCalculator(){
		team = 0;// means team not specified
		abc=0;
		numOfHex=0;
	}
	
	protected PowerCalculator(int _team){
		team = _team;
		abc=0;
		numOfHex=0;
	}
	
	
	protected int getTeam(){
		return team;
	}
	
	protected void addHex(double a){
		
		abc += a;
		numOfHex++;
	}
	
	protected double getPower(){
		
		double finalPower = abc + numOfHex*0.3 - numOfHex +1 ;
		
		return finalPower;
	}
}
